import { Navigate } from "react-router-dom";
import { Layout } from 'antd';
const { Content } = Layout;
const getToken = () => {
    return sessionStorage.getItem("RSnetToken")
}
function AuthRouter({ children }) {
    const token = getToken()
    if (token) {
        return <>{children}</>
    } else {
        return <Navigate to={'/login'} replace={true}>{children}</Navigate>
    }
}
export {
    AuthRouter
}
